package com.lanou.controller;

import com.lanou.service.BannerService;
import com.lanou.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName BannerController
 * @Description TODO
 * @Author lizhenjiang
 * @Date 2025年08月15日 17:46
 * @Version 1.0
 */
@RestController
@RequestMapping("banner")
public class BannerController {
    @Autowired
    private BannerService bannerService;

    @GetMapping("getPages")
    public R findBanners( @RequestParam(value = "pageNum",required = false) Integer pageNum,
                          @RequestParam(value = "pageSize",required = false) Integer pageSize){
        return R.ok(bannerService.findBanners(pageNum,pageSize));
    }
}
